<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>筛选</title>
<script>
	function zhuangye(majorid){
		window.location.href="shaixuan.php?major=" + majorid
	}
	
</script>
</head>
<body>
	<div>
		<a href="shaixuan.php?major=1">计算机</a>
		<a href="shaixuan.php?major=2">软件</a>
		<a href="shaixuan.php?major=3">电气</a>
	</div>
	<div>
		<input type="button" name="btn" id="btn1" value="计算机" onclick="zhuangye(1)" />
		<input type="button" name="btn" id="btn2" value="软件" onclick="zhuangye(2)" />
		<input type="button" name="btn" id="btn3" value="电气" onclick="zhuangye(3)" />
	</div>
	<div>
		<form>
		
			<select name="major">
			<option id="opt0" value="0">1111</option>
			<?php
			foreach($data_major as $key => $value){
			?>
			<option id="opt<?=$value[0]?>" value="<?=$value[0]?>"><?=$value[1]?></option>
			<?php
			}
			?>
			</select>
			<input type="submit" name="sub" value="确定">
		</form>
	</div>
	<script>
		var option = document.getElementById('opt<?=$major?>');
		option.selected = "selected";
	</script>
</body>
</html>